<include file="public:top" />
<!--网站设置-->
<body class="body">
<fieldset class="layui-elem-field layui-field-title" style="margin-top:0px;">
    <legend>{$menuid|getmenuname}</legend>
</fieldset>
<form class="layui-form layui-form-pane" action="">
    <input type="hidden" name="menuid"  value="{$menuid}"/>
    <div class="layui-form-item">
        <label class="layui-form-label">附件位置</label>
        <div class="layui-input-block">
            <input type="text" name="setting[attach_path]" placeholder="请输入" class="layui-input" value="{:C('wkcms_attach_path')}">
        </div>
    </div>
   <!--  <div class="layui-form-item">
        <label class="layui-form-label">附件类型</label>
        <div class="layui-input-block">
            <input type="text" name="setting[attr_allow_exts]" placeholder="请输入" class="layui-input" value="{:C('wkcms_attr_allow_exts')}">
        </div>
    </div> -->

    <div class="layui-form-item">
        <label class="layui-form-label">附件大小</label>
        <div class="layui-input-block">
            <input type="number" name="setting[attr_allow_size]" placeholder="请输入" class="layui-input" value="{:C('wkcms_attr_allow_size')}">
            <div class="layui-form-mid layui-word-aux">上传的最大文件大小。单位字节(kb), 1024kb = 1兆(mb)</div>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">文档类型</label>
        <div class="layui-input-block">
            <input type="text" name="setting[doctype]" placeholder="请输入" class="layui-input" value="{:C('wkcms_doctype')}">
            <div class="layui-form-mid layui-word-aux">文档类型之间用;隔开,类型格式为*.doc</div>
        </div>
        
    </div>

    <div class="layui-form-item">
        <label class=""></label>
        <div class="layui-input-block">
        <button class="layui-btn" lay-submit="" lay-filter="upbtn">提交保存</button>
        </div>
    </div>
</form>

<script type="text/javascript" src="__PUBLIC__/admin/layui/layui.js"></script>
<script>
//Demo
layui.use(['layer','jquery','form'], function () {
   // 操作对象
    var layer = layui.layer,$ = layui.jquery,form = layui.form;
  
  // 提交
    form.on('submit(upbtn)', function (data) {
        // 提交到方法 默认为本身
        $.post("{:u('global/edit')}",data.field,function(res){
            if(res.status.status ==  1){
                layer.msg(res.status.info,{time:1800},function(){
                  location.href = "{:u('global/index')}&type=attach&menuid={$menuid}";
                });
            }else{
                layer.msg(res.status.info,{time:1800});
                // $('.verify_img').click();
            }
        });
        return false;
    });
});
</script>
</body>
</html>